

n=int(input())
def get_result():
    printNum=1
    for i in range(1,n+1):
        printList=[]
        for j in range(i):
            printList.append(printNum)
            printNum=printNum+1
        if i%2==0:
            printList.reverse()
        sArr=[]
        for ele in printList:
            tem=str(ele)
            while len(tem)<4:
                tem=tem+"*"
            sArr.append(tem)
        res="    ".join(sArr)
        for k in range(0,n-i):
            res="    "+res
        print(res)

get_result()
